﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.Collections.Generic;

namespace SLControlLibrary.Resources.Controls.Calendar.OutlookCalendar.BusinessObjects
{
    public class AppointmentValueList : ObservableCollection<AppointmentValue>
    {
        #region Constructor
        public AppointmentValueList()
        {
        }
        #endregion

        #region Methods
        public void AddAppointmentToList(AppointmentValue _AppointmentValue)
        {
            this.Add(_AppointmentValue);
        }

        public void AddAppointmentToList(List<AppointmentValue> _AppointmentValues)
        {
            base.Clear();

            foreach (AppointmentValue _AppointmentValue in _AppointmentValues)
                AddAppointmentToList(_AppointmentValue);
        }

        public List<AppointmentValue> ToList()
        {
            List<AppointmentValue> _AppointmentValues = new List<AppointmentValue>();
            foreach (AppointmentValue _AppointmentValue in this.Items)
                _AppointmentValues.Add(_AppointmentValue);

            return _AppointmentValues;
        }

        public AppointmentValueList ToObservaleCollection(List<AppointmentValue> _AppointmentValues)
        {
            foreach (AppointmentValue _AppointmentValue in _AppointmentValues)
                this.Add(_AppointmentValue);

            return this;
        }
        #endregion
    }
}
